package catgory;

import org.assertj.core.util.Lists;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * describe:
 *
 * @author huxingjie
 * @date 2020/01/19
 * @since 4.0
 */
public class MultiArray {
    public static void main(String[] args) throws MalformedURLException {
        int arr[][] = new int[][]{{4, 3}, {1, 5}};
        //foreach语句遍历二维数组。
        System.out.println("数组中的元素是：");
        for (int x[] : arr) {  //外层遍历得到一维数组
            for (int e : x) {  //内层遍历得到数组元素
                System.out.print(e);
            }
            System.out.println();
        }
        String basePath= "http://172.20.25.74:18181/g1/M00/00/03/rBQZSl5h64GAY7wOAABf-Hs_m2E753.jpg";
        URL url =new URL(basePath);
        String protocol = url.getProtocol();
        System.out.println(url.getPath());
        Pattern pattern = Pattern.compile("^(http://)(.*)(:+)(.*)(/*)");
        Matcher matcher = pattern.matcher(basePath);
        if (matcher.find()) {
            String s  = matcher.group(4);
            System.out.println(s);
        }
    }
}

    